<template>
<!-- 登录界面 -->
  <div class="login">
    <div class="loginwindow">
      <div class="headtitle">请登录</div>
      <div class="input">
        <el-input v-model="userName" placeholder="请输入用户名"></el-input>
      </div>
      <div class="input">
        <el-input v-model="passWord" type="password" placeholder="请输入密码"></el-input>
      </div>
      <div class="button">
        <el-button type="primary" @click="tologin">登录</el-button>
        <el-button @click="clear">取消</el-button>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      userName: "",
      passWord: "",
    };
  },
  mounted() {
    // console.log(this.$route.query);
  },
  methods: {
    tologin() {
      this.$router.push({
        path: "/user",
      });
    },
    clear() {
      this.userName = "";
      this.password = "";
    },
  },
};
</script>

<style scoped>
.login {
  background-image: url("../../assets/171534271575167.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  height: 100%;
  width: 100%;
}
.loginwindow {
  height: 300px;
  width: 300px;
  background-color: white;
  position: absolute;
  right: 100px;
  top: 20%;
}
.headtitle {
  height: 60px;
  line-height: 60px;
  text-align: center;
  font-size: 20px;
}
.input {
  width: 80%;
  padding-left: 10%;
  line-height: 60px;
}
.button {
  text-align: center;
  padding-top: 10px;
}
</style>

<style>
.el-input__inner {
  height: 40px !important;
  width: 240px;
}
</style>
